#include <osgDB/ReadFile>
#include <QGuiApplication>
#include <QQuickView>
#include <QQmlContext>
#include "quick/OsgQWindow.h"
#include "quick/fboinsgrenderer.h"
#include "quick/squircle.h"
#include <QDebug>

int runTest4(int argc, char** argv)
{
	QGuiApplication app(argc, argv);

	OsgQWindow window(0, 0, 800, 600);
	auto model = osgDB::readNodeFile("cube.ply");
	window.show(model);

	/*
	qmlRegisterType<FboInSGRenderer>("HB.Scene3D", 1, 0, "Scene3D");

	auto quickView = new QQuickView;
	quickView->setSurfaceType(QSurface::OpenGLSurface);
	quickView->setSource(QUrl("../test/quick/main.qml"));
	quickView->resize(1920, 720);
	quickView->create();

	quickView->show();
	*/
	/*
	qmlRegisterType<Squircle>("OpenGLUnderQML", 1, 0, "Squircle");
	QQuickView view;
	view.setResizeMode(QQuickView::SizeRootObjectToView);
	view.setSource(QUrl("../test/quick/squircle.qml"));
	view.show();
	*/

	return app.exec();
}
